<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"
	prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html"
	prefix="html"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic"
	prefix="logic"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<html>
	<head>
		<title>JSP for CampadvForm form</title>
		<LINK href="css/default.css" rel=stylesheet>
		<script language="javascript" src="js/dragelement.js"></script>
		<style type="text/css">
#id1 {
	width: 100%;
	height: 100%;
	background-color: #000;
	FILTER: alpha(opacity =   50);
	position: absolute;
	top: 0;
	left: 0;
	moz-opacity: 0.8;
	opacity: .80;
	z-index: 49;
}

#id2 {
	top: 10px;
	position: absolute;
	z-index: 99;
	border: 3px solid #E5E5E5;
	left: 100px;
	font: bold 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
	background-color: #F5FAFA;
}
</style>
		<script language="javascript" type="text/javascript">
		function show(){
		document.all.id1.style.height=document.body.scrollHeight+"px";
		document.all.id1.style.width=document.body.scrollWidth+"px";
		document.all.id1.style.display="";
		document.all.id2.style.display="";
		}
		function hide(){
		document.all.id1.style.display="none";
		document.all.id2.style.display="none";
		}
		function opchange(o){
		document.campadvForm.method.value=o;
		document.campadvForm.submit();
		}
		function cancelsub(){
			hide();
		}
		</script>
	</head>
	<body>
		
		<table width="880" cellspacing="0" cellpadding="0" border="0" align=center>
			<tbody>
				<tr>
					<td width="3" height="31">
						<img height="31" src="./images/table_01.gif" width="3" />
					</td>
					<td background="./images/table_02.gif" height="31">
						<table cellspacing="0" cellpadding="0" width="146" align="left"
							border="0">
							<tbody>
								<tr>
									<td width="51" background="./images/title_1_bg.gif">
										<img height="31" src="./images/title_1.gif" width="51" />
									</td>
									<td width="95" background="./images/title_1_bg.gif">
										<span class="color_b_666">营销建议</span>
									</td>
								</tr>
							</tbody>
						</table>
					</td>
					<td width="3">
						<img height="31" src="./images/table_03.gif" width="3" />
					</td>
				</tr>
				<tr>
					<td width="3" background="./images/table_04.gif" width="3"
						align="right">
						<img height="100%" src="./images/table_04.gif" width="3" />
					</td>
					<td>
						<table width="770" border="0" align="center" cellpadding="5"
							cellspacing="1" bgcolor="#FF9900">
							<tr>
								<th>
									<bean:message key="campadv.jsp.campid" />
								</th>
								<th>
									<bean:message key="campadv.jsp.advinfo" />
								</th>
								<th>
									<bean:message key="campadv.jsp.advcond" />
								</th>
								<th>
									<bean:message key="common.jsp.operation" />
									<html:link href="campadv.do?method=list&campid=${campid}">
										<bean:message key="common.jsp.addlink" />
									</html:link>
								</th>
							</tr>
							<logic:present name="campadvlist">
								<logic:iterate name="campadvlist" id="i">
									<tr bgcolor="ffffff">
										<td class="spec">
											<bean:write name="i" property="campId" />
										</td>

										<td class="alt">
											<bean:write name="i" property="advInfo" />
										</td>
										<td>
											<bean:write name="i" property="advCond" />
										</td>
										<td class="alt">
											<html:link
												href="campadv.do?method=list&campid=${i.campId}&campadvid=${i.campAdvId }">
												<bean:message key="common.jsp.viewlink" />
											</html:link>
										</td>
									</tr>
								</logic:iterate>
							</logic:present>
						</table>
						
						<html:form action="/campadv.do?campid=${campid}">
						<logic:present name="campadv" scope="request">
							
								<table width="550" border="0" align="center" cellpadding="5"
									cellspacing="1" bgcolor="#FF9900">
									<tr>
										<td>
											<bean:message key="campadv.jsp.campid" />
										</td>
										<td>
											<html:text readonly="true" property="campadv.campId"
												value="${campadv.campId}" />
										</td>
									</tr>
									<tr>
										<td>
											<bean:message key="campadv.jsp.campadvid" />
										</td>
										<td>
											<html:text readonly="true" property="campadv.campAdvId"
												value="${campadv.campAdvId}" />
										</td>
									</tr>
									<tr>
										<td>
											<bean:message key="campadv.jsp.advinfo" />
										</td>
										<td>
											<html:textarea rows="4" cols="50" property="campadv.advInfo" 
												value="${campadv.advInfo}" />
										</td>
									</tr>
									<tr>
										<td>
											<bean:message key="campadv.jsp.advcond" />
										</td>
										<td>
											<html:textarea rows="4" cols="50" property="campadv.advCond"
												value="${campadv.advCond}" />
										</td>
									</tr>
									<tr>
										<td>
											<bean:message key="campadv.jsp.creatorname" />
										</td>
										<td>
											<html:text property="campadv.creatorName" readonly="true"
												value="${campadv.creatorName}" />
										</td>
									</tr>
									<tr>
										<td>
											<bean:message key="campadv.jsp.createtime" />
										</td>
										<td>
											<html:text property="campadv.createTime" readonly="true"
												value="${campadv.createTime}" />
										</td>
									</tr>
									<tr>
										<td colspan="2" align="center" class="alt">
											<img src='images/button_modify.gif' width="63" height="21" onclick="opchange('save')" />
											&nbsp;&nbsp;
											<img src='images/button_delete.gif' width="63" height="21" onclick="opchange('delete')" />
											&nbsp;&nbsp;
											<img src='images/button_exit.gif' width="63" height="21" onclick="opchange('list')" />
										</td>
									</tr>
								</table>
							
						</logic:present>
						<logic:notPresent name="campadv" scope="request">
							
								<table width="550" border="0" align="center" cellpadding="5"
									cellspacing="1" bgcolor="#FF9900">
									<tr>
										<td>
											<bean:message key="campadv.jsp.advinfo" />
										</td>
										<td>
											<html:textarea rows="4" cols="50" property="campadv.advInfo" />
										</td>
									</tr>
									<tr>
										<td>
											<bean:message key="campadv.jsp.advcond" />
										</td>
										<td>
											<html:textarea rows="4" cols="50" property="campadv.advCond" />
										</td>
									</tr>
									<tr>
										<td>
											<bean:message key="campadv.jsp.creatorname" />
										</td>
										<td>
			
											<html:text property="campadv.creatorName" readonly="true"
												value="${User_Name}" />
										</td>
									</tr>
									<html:hidden property="campadv.campId" value="${campid}" />
									<html:hidden property="campadv.campAdvId" value="" />
									<tr>
										<td class="spec" colspan="2" align='center'>
											<img src='images/button_addnew.gif' width="63" height="21" onclick="opchange('save')" />
											&nbsp;&nbsp;
											<img src='images/button_cancel.gif' width="63" height="21" onclick="" />
										</td>
									</tr>
								</table>
							
							<script type="text/javascript"></script>
						</logic:notPresent>
						<html:hidden property="method" value="save" />
					</html:form>
					</td>
					<td background="./images/table_05.gif" width="3" align="left">
						<img height="100%" src="./images/table_05.gif" width="3">
					</td>
				</tr>
				<tr>
					<td height=3 valign="top">
						<img height="12px" src="./images/table_06.gif" width="3px">
					</td>
					<td height=3 valign="top">
						<img height="3px" src="./images/table_07.gif" width="100%">
					</td>
					<td height=3 valign="top">
						<img height="12px" src="./images/table_08.gif" width="3px">
					</td>
				</tr>
			</tbody>
		</table>
		
	</body>
</html>

